 <template>
  <div>
    <div class="logo">
      <img
        src="https://www.baidu.com/img/PCtm_d9c8750bed0b3c7d089fa7d55720d6cf.png"
        alt=""
        width="265px"
        height="120px"
      />
      <form action="" class="ssk fl">
        <input
          type="text"
          @focus="jc()"
          v-model="msg"
          @blur="sq"
          @keydown.up="up()"
          @keydown.down="dw()"
        />
        <i class="a7"></i> <span class="a6 fr">百度一下</span>
     
      </form>
    </div>
    <ul class="xq" v-show="t">
      <li
        v-for="(item, index) in da"
        @mousemove="ove(item)"
        @mouseout="out(item)"
        :key="index"
        :class="{ active: ind==index || item.boo }"
      >
        {{ item.name }}
      </li>
    </ul>
  </div>
</template>
 <script>
export default {
  props: ["da", "t","ind","msg"],
  data() {
    return {
      bool: false,
      ind:0,
    };
  },
  methods: {
    jc() {
      this.$emit("show", this.bool);
       console.log(this.$root); 
    },
    sq() {
      this.$emit("blur", this.bool);
    },
    ove(item) {
      this.$emit("ove", item);
    },
    out(item) {
      this.$emit("out", item);
    },
    up(){
      this.$emit("up");
    },
    dw(){
       this.$emit("up");
    }
  },
  computed: {},
};
</script>
 <style lang='css'>
</style>